package com.library.librarybackend.controller;

import cn.dev33.satoken.stp.StpUtil;
import com.library.librarybackend.domain.Result;
import com.library.librarybackend.domain.constant.GlobalConstant;
import com.library.librarybackend.domain.vo.UserVO;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 平
 * @description 健康检查
 * @since 2025-09-19 00:00
 */
@Tag(name = "健康检查控制类")
@RestController
@RequestMapping("/health")
public class HealthController {

    @GetMapping
    @Operation(summary = "健康检查")
    public Result<UserVO> health() {
        return Result.success(StpUtil.getSession().getModel(GlobalConstant.USER_SESSION, UserVO.class));
    }


}
